]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
user-menu: Rename "Do Not Disturb" to "Notifications"
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 4 Sep 2011 16:39:37 +0000 (18:39 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Sep 2011 15:19:08 +0000 (17:19 +0200)
At least for the foreseeable future, the gnome-session desktop
presence won't be used for anything but suppressing (non-urgent)
notifications. To clarify this behavior, rename the "Do Not Disturb"
switch to "Notifications" (and adjust the switch logic accordingly).

https://bugzilla.gnome.org/show_bug.cgi?id=652718

js/ui/userMenu.js

index d5349bae26f0b43d885e1c9f8ee3c85d7aca5df5..7a32d8775e0e84eb3f00980602fc8fe89834e0aa 100644 (file)
@@ -522,8 +522,8 @@ UserMenuButton.prototype = {
     },
 
     _updateSwitch: function(presence, status) {
-        let active = status == GnomeSession.PresenceStatus.BUSY;
-        this._dontDisturbSwitch.setToggleState(active);
+        let active = status == GnomeSession.PresenceStatus.AVAILABLE;
+        this._notificationsSwitch.setToggleState(active);
     },
 
     _updatePresenceIcon: function(accountMgr, presence, status, message) {
@@ -548,10 +548,10 @@ UserMenuButton.prototype = {
         item.connect('activate', Lang.bind(this, this._onMyAccountActivate));
         this.menu.addMenuItem(item);
 
-        item = new PopupMenu.PopupSwitchMenuItem(_("Do Not Disturb"));
+        item = new PopupMenu.PopupSwitchMenuItem(_("Notifications"));
         item.connect('activate', Lang.bind(this, this._updatePresenceStatus));
         this.menu.addMenuItem(item);
-        this._dontDisturbSwitch = item;
+        this._notificationsSwitch = item;
 
         item = new PopupMenu.PopupSeparatorMenuItem();
         this.menu.addMenuItem(item);
@@ -594,8 +594,8 @@ UserMenuButton.prototype = {
     },
 
     _updatePresenceStatus: function(item, event) {
-        let status = item.state ? GnomeSession.PresenceStatus.BUSY
-                                : GnomeSession.PresenceStatus.AVAILABLE;
+        let status = item.state ? GnomeSession.PresenceStatus.AVAILABLE
+                                : GnomeSession.PresenceStatus.BUSY;
         this._presence.setStatus(status);
     },